<template>
	<view class="zxitem" @click="openLocationfn()">

		<view class="zxitem-title">
			<view class="zxitem-title-text">
				{{ item.baseName }}
			</view>
			<view class="zxitem-title-info">
				{{ item.address }}
			</view>

		</view>
		<view class="zxitem-img u-flex-xy-center">
			<u--image :showLoading="true" :src="dtpng" width="80rpx" height="80rpx" radius="4"></u--image>
		</view>
	</view>
</template>
<script>
	import dtpng from "@/static/basepage/dt.png";
	import logo from "@/static/logo.png";
	export default {
		props: {
			item: {
				type: Object,
				default: () => {
					return {};
				},
			},
		},
		data() {
			return {
				dtpng,
				logo: logo,
			};
		},
		methods: {
			// gopage() {
			// 	uni.navigateTo({
			// 		url: "/pages/parse/parse?" + qs.stringify({
			// 			type: 'news',
			// 			id: this.item.id
			// 		}),
			// 	});
			// },
			openLocationfn() {

				uni.openLocation({
					latitude: Number(this.item.lat),
					longitude: Number(this.item.lng),
					scale: 18,
					success: function() {
						console.log("success");
					},
				});

			},
		},
	};
</script>
<style lang="scss" scoped>
	.zxitem {
		display: flex;
		padding: 20rpx 20rpx;
		position: relative;
		align-items: center;

		.zxitem-title {
			flex: 1;
			width: 0;
			margin-right: 10px;
			display: flex;
			flex-direction: column;
			justify-content: center;
			// justify-content: space-between;

			.zxitem-title-text {
				font-size: 16px;
				color: #333;
				//   margin-bottom: 10px;
			}

			.zxitem-title-info {
				font-size: 12px;
				color: #999;
				// justify-content: center;
			}
		}

		.zxitem-img {
			width: 120rpx;
			height: 80rpx;
		}

		&::after {
			content: "";
			position: absolute;
			bottom: 0;
			left: 20rpx;
			right: 20rpx;
			border-bottom: 1px solid #eee;
		}
	}
</style>